<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
</html>
</xsl:template>
</xsl:stylesheet>version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
<root>
	<str_sql>
		<str_sql_replace>RECORD_ID_LIST</str_sql_replace>
		<sql>
			<!--SET NOCOUNT ON 
			Create Table #T_RECORD_ID(PK_ID int);
			Exec Sp_ListToTable '#RECORD_ID_LIST#', 'PK_ID', '#T_RECORD_ID', ',';
			Select * From T_ONEGATE_RECORD Where PK_RECORD In (select Top 1 PK_ID From #T_RECORD_ID); 
			SET NOCOUNT OFF-->
			SET NOCOUNT ON 
			Create Table #T_RECORD_ID(PK_ID int);
			Exec Sp_ListToTable '#RECORD_ID_LIST#', 'PK_ID', '#T_RECORD_ID', ',';
			Select *, C_NAME as C_RECORDTYPE_NAME From T_ONEGATE_RECORD, T_ONEGATE_RECORDTYPE Where T_ONEGATE_RECORD.PK_RECORD In (select Top 1 PK_ID From #T_RECORD_ID) and T_ONEGATE_RECORD.FK_RECORDTYPE = T_ONEGATE_RECORDTYPE.PK_RECORDTYPE; 
			SET NOCOUNT OFF
		</sql>
	</str_sql>
	<replace_list>
		
		
		
		<replace>
			<from_xml_data>true</from_xml_data>
			<data_format>selectbox</data_format>
			<find_string>#QUANLITY#</find_string>
			<xml_tag_in_db>record_form</xml_tag_in_db>
			<field_name></field_name>
			<selectbox_option_sql>ONEGATE_ListGetAllbyCode 'TNMT_TCBLQSDvTS_HTHS'</selectbox_option_sql>
		</replace>
					
		<replace>
			<from_xml_data>false</from_xml_data>
			<data_format></data_format>
			<find_string>#RECORD_CODE#</find_string>
			<xml_tag_in_db></xml_tag_in_db>
			<field_name>C_CODE</field_name>
		</replace>
		<replace>
			<from_xml_data>false</from_xml_data>
			<data_format>getdate</data_format>
			<find_string>#INFORM_DATE#</find_string>
			<xml_tag_in_db></xml_tag_in_db>
			<field_name></field_name>
		</replace>
		<replace>
			<from_xml_data>true</from_xml_data>
			<data_format>text</data_format>
			<find_string>#NAME#</find_string>
			<xml_tag_in_db>ho_ten</xml_tag_in_db>
			<field_name></field_name>
		</replace>
		
		<replace>
			<from_xml_data>true</from_xml_data>
			<data_format>text</data_format>
			<find_string>#ADDRESS#</find_string>
			<xml_tag_in_db>dia_chi_ben_the_chap</xml_tag_in_db>
			<field_name></field_name>
		</replace>
		
		<replace>
			<from_xml_data>false</from_xml_data>
			<data_format>text</data_format>
			<find_string>#RECORDTYPE#</find_string>
			<xml_tag_in_db></xml_tag_in_db>
			<field_name>C_RECORDTYPE_NAME</field_name>
		</replace>
		<replace>
			<from_xml_data>false</from_xml_data>
			<data_format>isdate</data_format>
			<find_string>#RECEIVED_DATE#</find_string>
			<xml_tag_in_db></xml_tag_in_db>
			<field_name>C_RECEIVED_DATE</field_name>
		</replace>
		<replace>
			<from_xml_data>false</from_xml_data>
			<data_format>isdate</data_format>
			<find_string>#APPOINTED_DATE#</find_string>
			<xml_tag_in_db></xml_tag_in_db>
			<field_name>C_APPOINTED_DATE</field_name>
		</replace>

		<replace>
			<from_xml_data>true</from_xml_data>
			<data_format>checkboxmultiple</data_format>
			<find_string>#INCLUDE_DOCUMENT#</find_string>
			<xml_tag_in_db>include_document</xml_tag_in_db>
			<field_name></field_name>
			<checkbox_multiple_sql>ONEGATE_ListGetAllbyCode 'TNMT_TCBLQSDvTS_TLKT'</checkbox_multiple_sql>
		</replace>
				
	</replace_list>
</root>